<?php
//The next comment block is for PHPDocumentor
/**
 * Conference Registration - Registration for conferences
 * 
 * Administration index page
 * 
 * @author Kevin van Haaren (kevin@vanhaaren.net)
 * @copyright 2006 Kevin van Haaren, US
 * @package CONFREG
 * @subpackage Admin
 * 
 */


/**
* Do all the declarations etc needed by an admin page
*/
include_once "adminheader.inc";

//Display the admin menu
xoops_module_admin_menu(1,_AM_CONFREG_ADMENU0);


$conferences =& $xoopsDB->query("SELECT *" .
								" FROM " . $xoopsDB->prefix("confreg_conferences"));

$conf_count = $xoopsDB->getRowsNum($conferences);
echo "<table width=90%>";
echo '<tr><th style="text-align:center;">Conf<br />ID</th><th width=33% style="text-align:center;">Title</th><th style="text-align:center;">Start Date</th><th style="text-align:center;">End Date</th><th style="text-align:center;">Reg Open</th><th style="text-align:center;">Reg Close</th></tr>';
if ($conf_count > 0) {
	while ($confData = $xoopsDB->fetchArray($conferences)) {
		echo "<tr>";
		echo '<td style="text-align:center;">' . $confData['conf_id'] . "</td>";
		echo "<td>" . $confData['title'] . "</td>";
		echo '<td style="text-align:right;">' . substr($confData['start_date'],0,10) . "</td>";
		echo '<td style="text-align:right;">' . substr($confData['end_date'],0,10) . "</td>";
		echo '<td style="text-align:right;">' . substr($confData['reg_start'],0,10) . "</td>";
		echo '<td style="text-align:right;">' . substr($confData['reg_end'],0,10) . "</td>";
		echo "</tr>";
	}
} else {
	echo "<tr><td colspan=5>No conferences defined yet.</td></tr>";
}
echo "</table></div><br /><br />";

//And put footer in
xoops_cp_footer();

/*
 * This file was generated by XBS ModGen, (c) 2006 A Kitson, UK. See http://xoobs.net
 * ModGen is a Module Code Generator for the Xoops CMS.  See http://xoops.org
 */
?>